#include "includes.h"


extern void setserverip(char *str, uint8_t strlen);

uint8_t BitCount(uint32_t Value)
{
	uint8_t Count = 0;
	while (Value != 0)
	{
		Value &= (Value - 1);
		Count++;
	}
	return Count;
}
extern void setsoft_v(char *str, uint8_t strlen);
extern void sethard_v(char *str, uint8_t strlen);
void SysParaInit(void)
{
	memset(&syspara, 0, sizeof(SysPara));
	userAlarm.bytes = 0;
	sysflag.bytes = 0;
	sysflag.bits.OPEN_CFET = 1;
	sysflag.bits.OPEN_DFET = 1;
	syspara.IntegralPower = 1050;
	syspara.IntegralPower_C = 1000;
	syspara.IntegralPowerjisuan = 1050;

	setsoft_v("uart:0.0.3", strlen("uart:0.0.3") + 1);
	sethard_v("uart:0.0.3", strlen("uart:0.0.3") + 1);
	setserverip("energygdgz.chinatowercom.cn", strlen("energygdgz.chinatowercom.cn") + 1);
	flashpara.serverport = 20096;
}
